package com.woniuxy.consumeserver.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName finance_pay_plan
 */
@TableName(value ="finance_pay_plan")
@Data
public class FinancePayPlan implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 消费额度ID
     */
    private Long financeConsumeId;

    /**
     * 订单ID
     */
    private Long financeOrderId;

    /**
     * 还款额度
     */
    private BigDecimal payAmount;

    /**
     * 还款截止日期
     */
    private Date payPlanTime;

    /**
     * -1： 删除 0:未还  1：已还
     */
    private Integer payPlanState;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 创建人
     */
    private String createBy;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 修改人
     */
    private String updateBy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FinancePayPlan other = (FinancePayPlan) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFinanceConsumeId() == null ? other.getFinanceConsumeId() == null : this.getFinanceConsumeId().equals(other.getFinanceConsumeId()))
            && (this.getFinanceOrderId() == null ? other.getFinanceOrderId() == null : this.getFinanceOrderId().equals(other.getFinanceOrderId()))
            && (this.getPayAmount() == null ? other.getPayAmount() == null : this.getPayAmount().equals(other.getPayAmount()))
            && (this.getPayPlanTime() == null ? other.getPayPlanTime() == null : this.getPayPlanTime().equals(other.getPayPlanTime()))
            && (this.getPayPlanState() == null ? other.getPayPlanState() == null : this.getPayPlanState().equals(other.getPayPlanState()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFinanceConsumeId() == null) ? 0 : getFinanceConsumeId().hashCode());
        result = prime * result + ((getFinanceOrderId() == null) ? 0 : getFinanceOrderId().hashCode());
        result = prime * result + ((getPayAmount() == null) ? 0 : getPayAmount().hashCode());
        result = prime * result + ((getPayPlanTime() == null) ? 0 : getPayPlanTime().hashCode());
        result = prime * result + ((getPayPlanState() == null) ? 0 : getPayPlanState().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", financeConsumeId=").append(financeConsumeId);
        sb.append(", financeOrderId=").append(financeOrderId);
        sb.append(", payAmount=").append(payAmount);
        sb.append(", payPlanTime=").append(payPlanTime);
        sb.append(", payPlanState=").append(payPlanState);
        sb.append(", createTime=").append(createTime);
        sb.append(", createBy=").append(createBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}